Run-length encoding (RLE) is one of the simplest forms of data compression and is widely used in video data encoding. RLE is usually the third step in the data compression schemes in most video encoders. RLE is generally preceded by a de-correlating transform and quantization of the transform coefficients. After quantization, most of the coefficients become zero. The resulting sparse data is run-length encoded. In RLE, the run denotes the number of zeroes immediately preceding a level when the transform coefficients are scanned in a special zigzag order. Generally in the last stage of compression, these run-level pairs are variable length coded (e.g. Huffman coded).
Much of video coding including RLE is defined in an inherently serial manner. However many powerful digital signal processors employed in video coding, such as the Texas Instruments TMS320C6400 family of digital signal processors, employ very long instruction word (VLIW) architecture. VLIW architectures can be very efficient in exploiting instruction level parallelism in algorithms. VLIW architectures are less capable when performing serial operations. Accordingly, there is a need in the art for techniques of efficiently employing VLIW processors in RLE in video encoding.